<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Base;
class FangAttr extends Base
{
    public function setIconAttribute($value)
    {
        $this->attributes['icon'] = $value ?: "";
    }
    public function setFieldNameAttribute($value)
    {
        $this->attributes['field_name'] = $value ?: "";
    }

    public function getFangAttrAll(){

        $data=self::all();
        $result =$this->treeLevel($data);
        return  $result;
    }
}
